<{include file="admin/statis/im/tmp_header.tpl"}>
	<{include file="admin/statis/im/meta.tpl"}>
	<div id="date-picker">
		<div class="hidden onlinedate"></div>
		<a href="javascript:void(0)">历史记录</a>
	</div>
<script type="text/javascript">
$(function() {

	/**
	 * 初始化时间控件
	 */
	$(".onlinedate").datepicker({ 
		minDate: new Date(2012, 3-1, 5), 
		maxDate: new Date(),
		onSelect: function (dateText, inst) {
			var url = '/merchant/im/online/' + dateText;
			window.location.assign(url);
		}
	});

	/**
	 * 动作响应
	 */
	$("#date-picker").find('a').click(function () { 
		$('.onlinedate').show();
	});
});
</script>

<div class="onlinechart">
	<{if $day}>
		<img src="/upload/zx/share/chart/im.<{$day}>.png">
	<{else}>
		<img src="/upload/zx/share/chart/im.<{"Y-m-d"|@date}>.png">
	<{/if}>
</div>
<{include file="admin/statis/im/tmp_footer.tpl"}>
